<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>{$Title|default:$Header|default:"Адмнистративная панель сайта"}</title>
	{$view->JQuery()}
	<link rel="stylesheet" type="text/css" media="screen" href="{$cnf.site.url}/ui/css/control.css" />
	<script type="text/javascript" src="{$cnf.site.url}/js/control.menu.horizontal.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			UiChangeState();
			UiHideWarnings();
		});
		
		function UiHideWarnings() {
			setTimeout(function(){ $('.Warnings').hide('fade'); }, 5000);
		}
		
		function UiChangeState() {
			$('.ui-state-default').hover(
				function() { $(this).removeClass('ui-state-default').addClass('ui-state-hover'); },
				function() { $(this).removeClass('ui-state-hover').addClass('ui-state-default'); }
			);
			$('.ui-state-hover').hover(
				function() { $(this).removeClass('ui-state-hover').addClass('ui-state-default'); },
				function() { $(this).removeClass('ui-state-default').addClass('ui-state-hover'); }
			);
		}
	</script>
</head>
	<body class="ui-widget">
	
	{include file='control/helpers/functions.tpl'}
	
	{if !$params.iframe}
	
		<div>
			<div class="ui-widget-content header">
				<h2>Система управления сайтом Phorm.CMS <span><a href="/">Перейти на основной сайт</a></span></h2>
				{if $UserData.userid>0}
					<div>
						Пользователь: {$UserData.username}<br />
						<a href="{$cnf.site.url}/users/signout/">Выход</a>
						{if $Acl.mvc.default.users.profile} &nbsp; <a href="{$cnf.site.url}/users/profile/">Ваш профиль</a>{/if}
					</div>
				{/if}
			</div>
			<div id="topmenu" class="ui-state-focus">{$Navigation.control.main.menu}</div>
			<h1 class="ui-widget-header">{$Header}</h1>
			{if $BranchMenu}<div id="branchmenu">{$BranchMenu}</div>{/if}
		</div>
	
	{/if}
	
	<div class="allcontent">
		{call name="ErrorsMessages"}
		{$MvcInfo.resourcetxt}
		{if $Layouts.content}{""|implode:$Layouts.content}{/if}
		<div class="clear"></div>
	</div>
	
	{if !$params.iframe}
	
		<div class="ui-widget-content footer">
			<p>Phorm CMS 2010-{$smarty.now|date_format:"%Y"}</p>
		</div>
	
	{/if}
		
	</body>
</html>

